package com.edu.medicalpro.base;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider;

import com.edu.medicalpro.kepuyemian.KepuviewModel;

public abstract class BaseActivity extends AppCompatActivity {
    private KepuviewModel viewModel;
    public KepuviewModel getViewModel() {
        return viewModel;
    }
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
            setContentView(getLayoutId());
            viewModel=new ViewModelProvider(this).get(KepuviewModel.class);
        initView();
        initData();
    }
    protected abstract void initView();
    protected abstract int getLayoutId();
    protected abstract void initData();
}
